//package com.lingyuan.product.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.stereotype.Component;
//
//import java.util.concurrent.LinkedBlockingQueue;
//import java.util.concurrent.ThreadPoolExecutor;
//import java.util.concurrent.TimeUnit;
//
///**
// * @ClassName EasyExcelThreadPoolExecutor
// * @Description 描述 导入线程池以提高导入效率。
// * @Author guoxin
// * @Date 2024/9/24 12:32
// */
//@Configuration
//public class EasyExcelThreadPoolExecutor {
//
//    @Bean(name = "excelThreadExecutor")
//    public ThreadPoolExecutor easyExcelStudentImportThreadPool() {
//        // 系统可用处理器的虚拟机数量
//        int processors = Runtime.getRuntime().availableProcessors();
//        return new ThreadPoolExecutor(processors + 1,
//                processors * 2 + 1,
//                10 * 60,
//                TimeUnit.SECONDS,
//                new LinkedBlockingQueue<>(1000000));
//
//    }
//}
